home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kmdi / tabwidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  3.7 KB  |  116 lines

  1. /* This file is part of the KDE libraries
  2.    Copyright (C) 2004 Christoph Cullmann <cullmann@kde.org>
  3.    Copyright (C) 2002,2003 Joseph Wenninger <jowenn@kde.org>
  4.  
  5.    This library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License as published by the Free Software Foundation; either
  8.    version 2 of the License, or (at your option) any later version.
  9.  
  10.    This library is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public License
  16.    along with this library; see the file COPYING.LIB.  If not, write to
  17.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18.    Boston, MA 02110-1301, USA.
  19.  
  20.    Based on:
  21.  
  22.    //----------------------------------------------------------------------------
  23.    //    Project              : KDE MDI extension
  24.    //
  25.    //    begin                : 07/1999       by Szymon Stefanek as part of kvirc
  26.    //                                         (an IRC application)
  27.    //    changes              : 09/1999       by Falk Brettschneider to create an
  28.    //                           - 06/2000     stand-alone Qt extension set of
  29.    //                                         classes and a Qt-based library
  30.    //                         : 02/2000       by Massimo Morin (mmorin@schedsys.com)
  31.    //                           2000-2003     maintained by the KDevelop project
  32.    //    patches              : -/2000        by Lars Beikirch (Lars.Beikirch@gmx.net)
  33.    //                         : 01/2003       by Jens Zurheide (jens.zurheide@gmx.de)
  34.    //
  35.    //    copyright            : (C) 1999-2003 by Falk Brettschneider
  36.    //                                         and
  37.    //                                         Szymon Stefanek (stefanek@tin.it)
  38.    //    email                :  falkbr@kdevelop.org (Falk Brettschneider)
  39.    //----------------------------------------------------------------------------
  40. */
  41.  
  42. #ifndef _KMDI_TABWIDGET_H_
  43. #define _KMDI_TABWIDGET_H_
  44.  
  45. #include <ktabwidget.h>
  46. #include <kmdi/global.h>
  47.  
  48. namespace KMDIPrivate
  49. {
  50.   class TabWidgetPrivate;
  51. }
  52.  
  53. namespace KMDI
  54. {
  55.  
  56. class KMDI_EXPORT TabWidget : public KTabWidget
  57. {
  58.   Q_OBJECT
  59.  
  60.   public:
  61.     TabWidget(QWidget* parent, const char* name=0);
  62.     virtual ~TabWidget();
  63.  
  64.     virtual void addTab ( QWidget * child, const QString & label );
  65.  
  66.     virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
  67.  
  68.     virtual void addTab ( QWidget * child, QTab * tab );
  69.  
  70.     virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
  71.  
  72.     virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
  73.  
  74.     virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
  75.  
  76.     virtual void removePage ( QWidget * w );
  77.  
  78.     KMDI::TabWidgetVisibility tabWidgetVisibility() const;
  79.  
  80.     void setTabWidgetVisibility( KMDI::TabWidgetVisibility );
  81.  
  82.     bool eventFilter(QObject *obj, QEvent *e );
  83.  
  84.   private slots:
  85.     void closeTab(QWidget* w);
  86.  
  87.   public slots:
  88.     void updateIconInView(QWidget*,QPixmap);
  89.     void updateCaptionInView(QWidget*,const QString&);
  90.  
  91.   signals:
  92.     void focusInEvent ();
  93.  
  94.   protected slots:
  95.    void childDestroyed ();
  96.  
  97.   private:
  98.     void maybeShow();
  99.     void setCornerWidgetVisibility(bool visible);
  100.  
  101.   private:
  102.     KMDI::TabWidgetVisibility m_visibility;
  103.  
  104.   private:
  105.     /**
  106.      * private d-pointer for BC
  107.      */
  108.     KMDIPrivate::TabWidgetPrivate *d;
  109. };
  110.  
  111. }
  112.  
  113. #endif
  114.  
  115. // kate: space-indent on; indent-width 2; replace-tabs on;
  116.